import request from "@/utils/request";

const DEPT_BASE_URL = "/oss";

export function getListApi(data) {
  return request({
    url: `${DEPT_BASE_URL}/list`,
    method: "post",
    data: data,
  });
}

export function remove(data) {
    return request({
      url: `${DEPT_BASE_URL}/remove`,
      method: "post",
      data: data,
    });
}

export function download(data, config) {
    return request({
      url: `${DEPT_BASE_URL}/download`,
      method: "post",
      data: data,
      ...config
    });
}

export function upload(data, params) {
    return request({
      url: `${DEPT_BASE_URL}/upload?filename=${params.filename}?path=${params.path}`,
      method: "post",
      data: data,
    });
}
